Visual Studio Code – Keyboard Shortcuts (Windows)

Interactive reference with demos • Modern design • Ready to print (Ctrl+P → Save as PDF)

1) Basics & File Management

ShortcutAction
Ctrl + Shift + P / F1 Show Command Palette
Command Palette Demo
The Command Palette gives you access to all of VS Code's functionality. Try it now:
  1. Press Ctrl+Shift+P
  2. Type "settings" to see all settings-related commands
  3. Try "toggle word wrap" to quickly change the editor's wrapping behavior
This is the most powerful shortcut in VS Code!
Ctrl + P Quick Open (Go to File)
Quick Open Demo
Quickly navigate between files in your project:
  1. Press Ctrl+P
  2. Start typing a filename
  3. Use arrow keys to select and press Enter to open
  4. Add ":" and a line number to go directly to that line (e.g., "app.js:15")
You can also type ">" to access the Command Palette from here.
Ctrl + Shift + N New window/instance
Ctrl + Shift + W Close window/instance
Ctrl + , Open User Settings
Settings Demo
VS Code's settings are very powerful:
  1. Press Ctrl+, to open Settings
  2. Search for "font size" to adjust editor font
  3. Click the "Open Settings (JSON)" icon to edit raw settings
  4. Try changing "editor.wordWrap": "on"
Settings sync across devices if you're signed in.
Ctrl + K Ctrl + S Open Keyboard Shortcuts
Ctrl + N New file
Ctrl + S Save file
Ctrl + K S Save all

2) Basic Editing

ShortcutAction
Ctrl + X / Ctrl + C Cut/Copy line (no selection)
Line Operations Demo
Work with entire lines efficiently:
  1. Place cursor anywhere on a line (no selection needed)
  2. Press Ctrl+X to cut the entire line
  3. Press Ctrl+V to paste it elsewhere
  4. Try Ctrl+C to copy the line without cutting
This works even if you only have part of the line selected.
Alt + / Move line up/down
Move Lines Demo
Rearrange code quickly:
  1. Place cursor on any line
  2. Press Alt+↓ to move it down
  3. Press Alt+↑ to move it up
  4. Try with multiple lines selected
VS Code will automatically fix indentation as you move lines.
Shift + Alt + / Copy line up/down
Ctrl + Shift + K Delete line
Ctrl + Enter / Ctrl + Shift + Enter Insert line below/above
Ctrl + Shift + \\ Jump to matching bracket
Ctrl + ] / [ Indent/Outdent line
Home / End Go to line start/end
Ctrl + Home / End Go to file start/end
Ctrl + / Scroll line up/down
Alt + Page Up / Page Down Scroll page up/down
Folding: Ctrl + Shift + [ / ] Fold/Unfold region
Ctrl + K Ctrl + [ / ] Fold/Unfold subregions
Ctrl + K Ctrl + 0 / J Fold all / Unfold all
Comments: Ctrl + K Ctrl + C / U Add/Remove line comment
Ctrl + / Toggle line comment
Shift + Alt + A Toggle block comment
Alt + Z Toggle word wrap

5) Multi‑Cursor & Selection

ShortcutAction
Alt + click Insert cursor
Multi-Cursor Demo
Edit multiple places at once:
  1. Hold Alt and click in multiple locations
  2. Type to add text at all cursor positions
  3. Use Ctrl+U to undo cursor additions
  4. Try with Ctrl+D to add cursors at matching words
This is incredibly powerful for repetitive edits.
Ctrl + Alt + / Add cursor above/below
Ctrl + U Undo last cursor operation
Shift + Alt + I Insert cursor at end of each selected line
Ctrl + L Select current line
Ctrl + Shift + L Select all occurrences of current selection
Ctrl + F2 Select all occurrences of current word
Shift + Alt + / Expand / Shrink selection
Alt + drag / Ctrl + Shift + Alt + arrows Box (column) selection

6) Rich Language Editing

ShortcutAction
Ctrl + Space / Ctrl + I Trigger suggestion / IntelliSense
IntelliSense Demo
VS Code's powerful code completion:
  1. Start typing code (e.g., in JavaScript: "document.")
  2. Press Ctrl+Space to trigger suggestions
  3. Use arrows to navigate and Enter to select
  4. Press Ctrl+Space again for details
  5. Try Ctrl+I for parameter hints during function calls
Works for variables, methods, and even filenames in imports.
Ctrl + Shift + Space Parameter hints
Shift + Alt + F Format document
Ctrl + K Ctrl + F Format selection
F12 Go to Definition
Alt + F12 Peek Definition
Ctrl + K F12 Open Definition to the side
Ctrl + . Quick Fix
Shift + F12 Show References
F2 Rename symbol
Ctrl + K X Trim trailing whitespace
Ctrl + K M Change file language

7) Editor & Layout Management

ShortcutAction
Ctrl + F4 / Ctrl + W Close editor
Ctrl + K F Close folder
Ctrl + \\ Split editor
Split Editor Demo
Work with multiple files side by side:
  1. Open a file
  2. Press Ctrl+\ to split the editor
  3. Use Ctrl+P to open another file in the new pane
  4. Press Ctrl+1/2 to switch between panes
  5. Drag files between panes to reorganize
Great for comparing files or working on related code.
Ctrl + 1 / 2 / 3 Focus 1st / 2nd / 3rd group
Ctrl + K / Focus previous/next group
Ctrl + Shift + Page Up / Page Down Move editor left/right
Ctrl + K / Move active editor group

8) Display & UI

ShortcutAction
F11 Toggle Full Screen
Shift + Alt + 0 Toggle editor layout (horizontal/vertical)
Ctrl + = / - Zoom in/out
Ctrl + B Toggle Sidebar
Ctrl + Shift + E / F / G / D / X Explorer / Search / Source Control / Run & Debug / Extensions
Ctrl + Shift + H Replace in files
Ctrl + Shift + J Toggle search details
Ctrl + Shift + U Show Output panel
Ctrl + Shift + V Open Markdown preview
Ctrl + K V Open Markdown preview to the side
Ctrl + K Z Zen Mode (press Esc twice to exit)

9) Integrated Terminal

ShortcutAction
Ctrl + ` Toggle integrated terminal
Terminal Demo
VS Code's built-in terminal is powerful:
  1. Press Ctrl+` to toggle the terminal
  2. Run commands like you would in a normal terminal
  3. Press Ctrl+Shift+` to open additional terminals
  4. Use the dropdown to switch between terminals
  5. Try right-clicking in the terminal for more options
The terminal supports all your favorite shell commands.
Ctrl + Shift + ` Create new terminal
Ctrl + C / Ctrl + V Copy / Paste (terminal)
Ctrl + / Scroll up/down
Shift + Page Up / Page Down Scroll page up/down
Ctrl + Home / End Scroll to top/bottom

10) Debug (bonus)

ShortcutAction
F5 Start/Continue
Debugging Demo
VS Code's debugging capabilities:
  1. Set breakpoints by clicking in the gutter
  2. Press F5 to start debugging
  3. Use F10 to step over
  4. Use F11 to step into functions
  5. Use Shift+F11 to step out
  6. Hover over variables to see their values
The debug console shows output and lets you evaluate expressions.
Shift + F5 Stop
F9 Toggle breakpoint
F10 Step over
F11 Step into
Shift + F11 Step out

Note: Shortcuts reflect the default Windows keymap in VS Code (some may vary if you've customized bindings or use certain extensions).